<?php

class ActionPollsQuestionsController extends AppController{
        
    public function addQuestion(){
        if (!empty($this->request->data)){
            $data = $this->request->data;
            
            $data = $this->ActionPollsQuestion->save($data);
            
            $id = $data['ActionPollsQuestion']['id'];
        }
        else{
            $id = 0;
        }
        $this->set('id', $id);
    }
    
    public function delQuestion($id){
        $this->ActionPollsQuestion->delete($id);
        $this->render(false);
    }
}

?>
